Imports System.Drawing.Drawing2D
Public Class FreeForm

    Private Sub FreeForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub btnCircleForm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCircleForm.Click
        Dim shape As GraphicsPath
        shape = New GraphicsPath()
        shape.AddEllipse(15, 25, Me.Width \ 2, Me.Height \ 2)
        Me.Region = New Region(shape)
  
    End Sub

    Private Sub btnShape_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShape.Click
        Dim shape As GraphicsPath
        shape = New GraphicsPath()
        Dim point1 As Point = New Point(100, 50)
        Dim point2 As Point = New Point(250, 100)
        Dim point3 As Point = New Point(300, 200)
        Dim point4 As Point = New Point(180, 300)
        Dim point5 As Point = New Point(80, 200)
        Dim point6 As Point = New Point(30, 150)
        Dim points As Point() = {point1, point2, point3, point4, point5, point6}

        shape.AddCurve(points)

        Me.Region = New Region(shape)

    End Sub
End Class